Re: PostgreSQL Query Speed Issues

Поиск
Список
Период
Сортировка
От Daniel Staal
Тема Re: PostgreSQL Query Speed Issues
Дата
Msg-id 82FD1007FBDCB8F82EC43F1A@[192.168.1.50]
обсуждение исходный текст
Ответ на Re: PostgreSQL Query Speed Issues  (Joseph Pravato <joseph.pravato@nomagic.com>)
Список pgsql-novice
--As of February 21, 2013 4:55:03 PM -0600, Joseph Pravato is alleged to
have said:

>>> # rows in contact: 574939
>>> # rows in contact_address_map: 574924
>> After loading this data, did you run an ANALYZE?
> No we did not, why would this be useful?

--As for the rest, it is mine.

Because it would let the database collect information on how the data is
stored and distributed, thereby giving it a better chance to choose the
best query plan.  (Things like: What are common values, what are ranges of
values, etc.  If half the database has the same zip code, using an index
for the zip code isn't useful for that zip code.  If it's an even
distribution, it is.  ANALYZE lets the database figure that out.)

Recent versions of PostgreSQL will periodically do this in the background,
but doing it explicitly in the foreground after major uploads of data is
almost always a good idea.

Daniel T. STaal

---------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------


В списке pgsql-novice по дате отправления:

Предыдущее
От: Joseph Pravato
Дата:
Сообщение: Re: PostgreSQL Query Speed Issues
Следующее
От: Paul Smith
Дата:
Сообщение: Re: minimum hardware requirements for small postgres db